Leetcode 2518 Number Of Great Partitions | Leetcode Weekly Contest 325